package vn.com.fsoft.business.impl;

import java.util.List;

import vn.com.fsoft.business.IAddressBussiness;
import vn.com.fsoft.model.dao.IAddressDAO;
import vn.com.fsoft.model.dao.impl.AddressDAO;
import vn.com.fsoft.model.entities.AddressNew;

public class AddressBussiness implements IAddressBussiness{

	@Override
	public List<AddressNew> lookUpAddress(String postCode, String street,
			String townName, int pageSize, int currentPage) {
		IAddressDAO aDao = new AddressDAO();		
		if(postCode == null || street == null || townName == null) {
			return null;
		} else {
			return aDao.lookUpAddress(postCode, street, townName, pageSize, currentPage);
		}
	}
	@Override
	public int getTotalPage(){
		IAddressDAO aDao = new AddressDAO();
		return aDao.getTotalPage();
	}
	
}
